{extend name="template/base" /}
{block name="style"}
<link href="__LIB__/select2-4.0.3/dist/css/select2.min.css" rel="stylesheet" />
{/block}
{block name="content"}
<div class="page-container">
    <form class="form form-horizontal" id="form" method="post" action="{:\\think\\Request::instance()->baseUrl()}">
        <h3 class="mb-20 text-c">收款押金</h3>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">司机：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <select name="driver_id" class="select2"  id="driver_id">
                    {empty name = "driver_id"}
                    <option value="">选择司机</option>
                    {/empty}
                    {volist name="users" id="user"}
                    <option value="{$user['id']}"  >{$user['id']}:{$user['realname']}：{$user['mobile']}</option>
                    {/volist}
                </select>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">收款项目：</label>
            <div class="formControls col-xs-6 col-sm-6 skin-minimal">
                <div class="check-box" >
                    <input type="checkbox" name="collection_item[]" id="collection_item-0" value="押金">
                    <label for="collection_item-0">押金</label>
                </div>
                <div class="check-box" >
                    <input type="checkbox" name="collection_item[]" id="collection_item-1" value="GPS">
                    <label for="collection_item-1">GPS</label>
                </div>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">收款押金金额：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" placeholder="收款押金金额" name="collection_money" value="{$vo.collection_money ?? ''}" >
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">收款方式：</label>
            <div class="formControls col-xs-6 col-sm-6 skin-minimal">
                <div class="radio-box">
                    <input type="radio" name="collection_means" id="collection_means-0" value="微信收款">
                    <label for="collection_means-0">微信收款</label>
                </div>
                <div class="radio-box">
                    <input type="radio" name="collection_means" id="collection_means-1" value="支付宝收款">
                    <label for="collection_means-1">支付宝收款</label>
                </div>
                <div class="radio-box">
                    <input type="radio" name="collection_means" id="collection_means-2" value="现金收款">
                    <label for="collection_means-2">现金收款</label>
                </div>
                <div class="radio-box">
                    <input type="radio" name="collection_means" id="collection_means-3" value="银行卡收款">
                    <label for="collection_means-3">银行卡收款</label>
                </div>
                <div class="radio-box">
                    <input type="radio" name="collection_means" id="collection_means-4" value="运费中付款">
                    <label for="collection_means-4">运费中付款</label>
                </div>

            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <button type="submit" class="btn btn-primary radius">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>
                <button type="button" class="btn btn-default radius ml-20" onClick="layer_close();">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </div>
    </form>
</div>
{/block}
{block name="script"}
<script type="text/javascript" src="__LIB__/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="__LIB__/select2-4.0.3/dist/js/select2.min.js"></script>
<!--时间插件-->
<script type="text/javascript" src="__LIB__/My97DatePicker/WdatePicker.js"></script>
<script>
    $(function () {

        var id = $("#driver_id").select2({
            language: "zh-CN", //设置 提示语言
            width: "100%", //设置下拉框的宽度
            theme: "classic"
        });
        {notempty name = "driver_id"}
        id.val("{$driver_id}").trigger("change");
        {/notempty}
        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });

        $("#form").Validform({
            tiptype: 2,
            ajaxPost: true,
            showAllError: true,
            callback: function (ret){
                ajax_progress(ret);
            }
        });
    })
</script>
{/block}
